<?php

/**
 * Yabsta News
 * 
 * Edit news action view file
 *
 * This file is a subject under proprietary sofrware license
 *
 * @category
 * @package
 * @subpackage
 * @author      valerii lazarevych <lazarevuch@gmail.com>
 * @copyright   copyright(c) valerii lazarevych
 * @license     proprietary software license
 * @version     $Id: editnews.phtml 29.05.2012 16:40:53 valerii $
 */
?>

<script type="text/javascript">
    $('.news_searching').remove();
</script>

<h1 style='width: 170px;display:inline; float:left;'>
    <?php echo !$this->editNews->getId() ? 'Add a News' : 'Edit a News';?> </h1>
                
<?php if ( $this->editNews->getId() ){?>
    <a style="float:right;margin-top:10px;" class="btn btn-success coursera-profile-button-go"  
       href="/newsdelete/<?php echo $this->editNews->getId();?>">DELETE</a>  <?php }?>
        
<hr style="clear:both">
<div id="internal_html_page_content">
    
  <form class="cousera-signin" method="post" action="/savenews">
      
    <input type="hidden" name="id" value='<?php echo (int)$this->editNews->getId();?>' />
    
    <!-- News Title field-->    
    <div class="control-group">                               
        <div class="controls">
            <input name="title" type="text" id="signin-email" placeholder="Title" class="placeholder" style="width:420px;" 
                <?php echo $this->editNews->newsTitle() != '' ? 'value="'.$this->editNews->newsTitle().'"' : '';?> />  </div>  </div>
    
    <!-- News Body field-->          
    <div class="control-group">        
        <div class="controls">
            <textarea name="body" id="signin-password" placeholder="News body" class="placeholder" style="width:420px;max-width:420px;min-height: 300px;"><?php echo  $this->editNews->newsBody() != '' ? $this->editNews->newsBody() : '';?></textarea> </div> </div>
    
    <!-- News Tags field-->    
    <div class="control-group">                                       
        <div class="controls">                    
            <input name='tags' type="text" id="signin-email" placeholder="Tags" class="placeholder" style="width:250px;"
                   <?php echo $this->editNews->newsTags() != '' ? 'value="'.$this->editNews->newsTags().'"' : '';?> />  </div>  </div>
        
    <div>
        <div class="control-group">
            <div class="controls">
                <button class="btn btn-primary coursera-course-button-join" style="margin-right:10px" type="submit">Go</button>
                <a href="/news" class="btn btn-primary coursera-course-button-join"> Cancel </a>                
  </form>

</div>
    